package cn.yza.Kotlin.`01`

import java.util.*


/**
@author Honglixi
@create 2022-05-25 17:45
 */
class Rectangle(val height: Int, val width: Int) {
    val isSquare: Boolean
        get() {
            return height == width
        }

}
fun createRandomRectangle(): Rectangle {
    val random = Random()
    return Rectangle(random.nextInt(), random.nextInt())
}

//fun main() {
//    val rectangle = Rectangle(41, 43)
////    rectangle.isSquare = (60,50)
//    println(rectangle.isSquare)
//}